﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Configuration;

namespace Web
{
    public static class MyConfig
    {
        public static int PageSize
        {
            get
            {
                try
                {
                    return int.Parse(WebConfigurationManager.AppSettings["PageSize"].ToString());
                }
                catch { }
                return 20;
            }
        }

        public static string DateFormat
        {
            get
            {
                try
                {
                    return WebConfigurationManager.AppSettings["DateFormat"].ToString();
                }
                catch { }
                return "dd/MM/yyyy";
            }
        }

        public static string DateTimeFormat
        {
            get
            {
                try
                {
                    return WebConfigurationManager.AppSettings["DateTimeFormat"].ToString();
                }
                catch { }
                return "dd/MM/yyyy hh:mm:ss tt";
            }
        }

        public static string CurrencyFormat
        {
            get
            {
                try
                {
                    return WebConfigurationManager.AppSettings["CurrencyFormat"].ToString();
                }
                catch { }
                return "#,##0";
            }
        }
    }
}
